import CodeBlock from "@theme/CodeBlock";

# Together AI

Here's an example of calling a Together AI model as an LLM:

import TogetherAI from "@examples/models/llm/togetherai.ts";
import TogetherAIStream from "@examples/models/llm/togetherai_stream.ts";

<CodeBlock language="typescript">{TogetherAI}</CodeBlock>

:::info
You can see a LangSmith trace of this example [here](https://smith.langchain.com/public/f49160bd-a6cd-4234-96de-b8106a9e08a7/r)
:::

You can run other models through Together by changing the `modelName` parameter.

You can find a full list of models on [Together's website](https://api.together.xyz/playground).

### Streaming

Together AI also supports streaming, this example demonstrates how to use this feature.

<CodeBlock language="typescript">{TogetherAIStream}</CodeBlock>

:::info
You can see a LangSmith trace of this example [here](https://smith.langchain.com/public/26b5716e-6f00-47c1-aa71-1838a1eddbd1/r)
:::
